package cn.wolfcode.wolf2w.job.task;

import cn.wolfcode.wolf2w.business.api.RemoteNoteService;
import cn.wolfcode.wolf2w.business.api.RemoteStrategyService;
import cn.wolfcode.wolf2w.common.core.constant.SecurityConstants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.Date;

@Component("travelTask")
public class TravelTask {
    @Autowired
    private RemoteStrategyService remoteStrategyService;
    @Autowired
    private RemoteNoteService remoteNoteService;

    public void test() {
        String time = new Date().toString();
        System.out.println(time);
    }

    //使用fegin调用
    public void statisStragtegyRank() {
        remoteStrategyService.statisRank("inner");
      /*  或者
        remoteStrategyService.statisRank(SecurityConstants.INNER);
        */


    }

    public void statisStragtegyCondition() {
        remoteStrategyService.statisCondition("inner");


    }
    //统计数据的持久化
    public void strategyStatisHashPersistence() {
            remoteStrategyService.strategyStatisHashPersistence(SecurityConstants.INNER);
        }
        //游记数据的持久化
    public void strategyNoteHashPersistence() {
        remoteNoteService.noteStrategyNoteHashPersistence(SecurityConstants.INNER);

    }

}
